Component({
  properties: {
    show: {
      type: Boolean,
      value: false
    }
  },
  data: {
    columns: [
      { label: '日统计', value: 1 },
      { label: '周统计', value: 2 },
      { label: '月统计', value: 3 },
      { label: '自定义统计', value: 4 },
    ]
  },
  methods: {
    select ({ currentTarget: { dataset: { item } } }) {
      this.setData({ currentItem: item })
    },
    close () {
      this.triggerEvent('close')
    },
    confirm () {
      this.triggerEvent('change', this.data.currentItem)
    }
  },
})